﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace IotFun.Views.MainView.Dto;

/// <summary>
/// mainview基础输入参数
/// </summary>
public class MainViewBaseInput
{
    /// <summary>
    /// 名称
    /// </summary>
    public virtual string name { get; set; }

    /// <summary>
    /// 编码
    /// </summary>
    public virtual string code { get; set; }
    /// <summary>
    /// 排序号
    /// </summary>
    public virtual string orderno { get; set; }

    public int rowHeight { get; set; }

    public int colNum { get; set; }

    /// <summary>
    /// 模式
    /// </summary>
    public virtual int mode { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public virtual DateTime createtime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public virtual DateTime updatetime { get; set; }

    /// <summary>
    /// 创建者Id
    /// </summary>
    public virtual long createuserid { get; set; }

    /// <summary>
    /// 修改者Id
    /// </summary>
    public virtual long updateuserid { get; set; }

    /// <summary>
    /// 软删除
    /// </summary>
    public virtual bool isdelete { get; set; }

}

/// <summary>
/// mainview分页查询输入参数
/// </summary>
public class MainViewInput : BasePageInput
{
}

/// <summary>
/// mainview增加输入参数
/// </summary>
public class AddMainViewInput : MainViewBaseInput
{
    
}

public class AddViewTagInput
{
    public long Id { get; set; }

    public int RowHeight { get; set; }

    public int ColNum { get; set; }
    /// <summary>
    /// 点位数据
    /// </summary>
    public List<ViewTagInput> Tags { get; set; }
}

/// <summary>
/// mainview删除输入参数
/// </summary>
public class DeleteMainViewInput : BaseIdInput
{
    /// <summary>
    /// Id
    /// </summary>
    [Required(ErrorMessage = "Id不能为空")]
    public long id { get; set; }

}

/// <summary>
/// mainview更新输入参数
/// </summary>
public class UpdateMainViewInput : MainViewBaseInput
{
    /// <summary>
    /// Id
    /// </summary>
    [Required(ErrorMessage = "Id不能为空")]
    public long id { get; set; }

}

/// <summary>
/// mainview主键查询输入参数
/// </summary>
public class QueryByIdMainViewInput : DeleteMainViewInput
{

}
